<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title am-cf">流转日志记录</div>
                </div>
                <div class="widget-body am-fr">
                    <!-- 工具栏 -->
                    <div class="page_toolbar am-margin-bottom-xl am-cf">
                        <form id="form-search" class="toolbar-form" action="">
                            <input type="hidden" name="s" value="/<?= $request->pathinfo() ?>">
                            <div class="am fr">
                                <div class="am-form-group am-fl">
                                    <?php $gender = $request->get('fromType'); ?>
                                    <select name="fromType"
                                            data-am-selected="{btnSize: 'sm', placeholder: '选择操作端口'}">
                                        <option value=""></option>
                                        <option value="1"
                                            <?= $gender === '1' ? 'selected' : '' ?>>电脑端
                                        </option>
                                        <option value="2"
                                            <?= $gender === '2' ? 'selected' : '' ?>>小程序端
                                        </option>
                                    </select>
                                </div>

                                <div class="am-form-group am-fl">
                                    <?php $gender = $request->get('datatype'); ?>
                                    <select name="datatype"
                                            data-am-selected="{btnSize: 'sm', placeholder: '选择操作类型'}">
                                        <option value=""></option>
                                        <option value="1"
                                            <?= $gender === '1' ? 'selected' : '' ?>>录入(进入资源池)
                                        </option>
                                        <option value="2"
                                            <?= $gender === '2' ? 'selected' : '' ?>>付订
                                        </option>
                                        <option value="3"
                                            <?= $gender === '3' ? 'selected' : '' ?>>签约
                                        </option>
                                        <option value="4"
                                            <?= $gender === '4' ? 'selected' : '' ?>>预失效
                                        </option>
                                        <option value="5"
                                            <?= $gender === '5' ? 'selected' : '' ?>>确认失效
                                        </option>
                                        <option value="6"
                                            <?= $gender === '6' ? 'selected' : '' ?>>驳回
                                        </option>
                                        <option value="7"
                                            <?= $gender === '7' ? 'selected' : '' ?>>放回资源池重新分配
                                        </option>
                                        <option value="8"
                                            <?= $gender === '8' ? 'selected' : '' ?>>系统分配
                                        </option>
                                        <option value="9"
                                            <?= $gender === '9' ? 'selected' : '' ?>>转出
                                        </option>
                                        <option value="10"
                                            <?= $gender === '10' ? 'selected' : '' ?>>区域管理员将过期客户手动分配给其他人员
                                        </option>
                                    </select>
                                </div>
                                <div class="am-form-group am-fl">
                                    <div class="am-input-group am-input-group-sm tpl-form-border-form">
                                        <input type="text" class="am-form-field" name="search"
                                               placeholder="客户名称/手机号码"
                                               value="<?= $request->get('search') ?>">
                                        <div class="am-input-group-btn">
                                            <button class="am-btn am-btn-default am-icon-search" type="submit"></button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="am-scrollable-horizontal am-u-sm-12">
                        <table width="100%" class="am-table am-table-compact am-table-striped
                         tpl-table-black am-text-nowrap">
                            <thead>
                            <tr>
                                <th>ID</th>
                                <th>操作人</th>
                                <th>操作人类型</th>
                                <th>操作类型</th>
                                <th>客户名称</th>
                                <th>被分配人</th>
                                <th>被分配人类型</th>
                                <th>操作端口</th>
                                <th>备注</th>
                                <th>操作时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php if (!$list->isEmpty()): foreach ($list as $item): ?>
                                <tr>
                                    <td class="am-text-middle"><?= $item['id'] ?></td>
                                    <td class="am-text-middle"><?= getUsertype($item['userid'],1)['name']  ?></td>
                                    <td class="am-text-middle"><?= getUsertype($item['userid'],1)['typename']  ?></td>
                                    <td class="am-text-middle"><?= getlogtype($item['datatype']) ?></td>
                                    <td class="am-text-middle"><?= getcuname($item['customerid']) ?></td>
                                    <td class="am-text-middle"><?= getUsertype($item['fenpeiid'],2)['name'] ?></td>
                                    <td class="am-text-middle"><?= getUsertype($item['fenpeiid'],2)['typename'] ?></td>
                                    <td class="am-text-middle"><?= ty($item['fromType']) ?></td>
                                    <td class="am-text-middle"><?= $item['remark'] ?></td>
                                    <td class="am-text-middle"><?= gettimes($item['create_time']) ?></td>
                                </tr>
                            <?php endforeach; else: ?>
                                <tr>
                                    <td colspan="11" class="am-text-center">暂无记录</td>
                                </tr>
                            <?php endif; ?>
                            </tbody>
                        </table>
                    </div>
                    <div class="am-u-lg-12 am-cf">
                        <div class="am-fr"><?= $list->render() ?></div>
                        <div class="am-fr pagination-total am-margin-right">
                            <div class="am-vertical-align-middle">总记录：<?= $list->total() ?></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
        // 冻结
        var url = "<?= url('finance.system/abonus') ?>";
        $('.j-frozen').delete('id', url, '确定要分账吗？');
    });
</script>


